package cn.tedu.controller;

import cn.tedu.service.CarServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("car")
@CrossOrigin//放行JS的请求--跨域的解决方案
public class Controller {
    @Autowired//调用service层的代码--di
    private CarServiceImpl carService;
    @RequestMapping("get")
    public Object car(){
        return carService.get();

    }
}
